﻿@model Sykj.Entity.Users
@{
    ViewData["Title"] = "修改密码";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
@section scriptstop
    {
    <link href="~/layuiadmin/formSelects-v4.css" rel="stylesheet" />
}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">修改密码</div>
                <div class="layui-card-body">

                    <div class="layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">当前密码</label>
                            <div class="layui-input-inline">
                                <input type="password" name="currPass" lay-verify="required" lay-verType="tips" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">新密码</label>
                            <div class="layui-input-inline">
                                <input type="password" name="newPassword" lay-verify="pass" lay-verType="tips" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">* 6到16个字符</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">确认新密码</label>
                            <div class="layui-input-inline">
                                <input type="password" name="reNewPassword" lay-verify="repass" lay-verType="tips" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="edit" id="submit" type="button">确认修改</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section scriptsfeet
        {
    <script type="text/javascript">
    layui.config({
        base: '/layuiadmin/'
    }).extend({
    }).use(['form', 'layer', 'sykjwh'], function () {
        var $ = layui.$,
            form = layui.form,
            sykjwh = layui.sykjwh;

        form.on('submit(edit)', function (obj) {
            //保存
            sykjwh.save('@Url.Action("updatepwd", "users", new { area = Constant.AREAMANAGER })', obj.field);
        });
    });
    </script>
}
